package com.atomic.test.example.service;


import com.atomic.test.example.entity.Board;
import com.atomic.test.example.exception.CRUDException;

import java.util.List;

/**
 * Created by dreamyao on 2017/1/27.
 */
public interface IBoardService extends IBaseService<Board> {

    /**
     * 创建论坛板块
     * @param board
     */
    Integer createBoard(Board board);

    /**
     * 根据论坛板块名获取论坛信息
     * @param boardName
     * @return
     */
    Board getBoardMassage(String boardName);

    /**
     * 根据论坛板块ID获取论坛信息
     *
     * @param id
     * @return
     */
    Board getMessageById(Integer id) throws CRUDException;

    /**
     * 根据论坛板块Id删除论坛板块
     * @param boardId
     */
    void deleteBoard(Integer boardId);

    /**
     * 获取所有论坛板块信息
     * @return
     */
    List<Board> findAllBoard();

    /**
     * 根据板块Id更新话题数
     * @param boardId
     * @param topicNum
     */
    Integer updateTopicNumByBoardId(Integer boardId,Integer topicNum);

}
